package com.min.monitor.controller;

import com.min.common.entity.R;
import com.min.monitor.os.ServerMonitor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/monitor")
public class MoniterController {

    @GetMapping("/os")
    public R osInfo() throws Exception {
        return R.ok().put("data", new ServerMonitor().getInfo());
    }

}
